package com.ebuy.mall.dao;

import com.ebuy.mall.entity.EBuyMallCoupon;
import com.ebuy.mall.util.PageQueryUtil;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface EBuyMallCouponMapper {
    int deleteByPrimaryKey(Long couponId);

    int deleteBatch(Integer[] couponIds);

    int insert(EBuyMallCoupon record);

    int insertSelective(EBuyMallCoupon record);

    EBuyMallCoupon selectByPrimaryKey(Long couponId);

    int updateByPrimaryKeySelective(EBuyMallCoupon record);

    int updateByPrimaryKey(EBuyMallCoupon record);

    List<EBuyMallCoupon> findCouponlList(PageQueryUtil pageUtil);

    int getTotalCoupons(PageQueryUtil pageUtil);

    List<EBuyMallCoupon> selectAvailableCoupon();

    int reduceCouponTotal(Long couponId);

    List<EBuyMallCoupon> selectByIds(List<Long> couponIds);

    List<EBuyMallCoupon> selectAvailableGiveCoupon();

}
